<!--{template common/header_simple_start}-->
<link href="static/css/common.css?{VERHASH}" rel="stylesheet" media="all">
<link href="admin/thame/images/style.css?{VERHASH}" rel="stylesheet" media="all">
<script type="text/javascript" src="static/js/jquery.leftDrager.js?{VERHASH}"></script>
<script src="admin/scripts/admin.js?{VERHASH}"></script>
<style>
	html,
	body {
		overflow: hidden;
		background: #FBFBFB;
	}
	
	.bs-left-container {
		width: 120px;
	}
	
	.bs-main-container {
		margin-left: 120px;
		overflow: auto;
	}
</style>
<!--{template common/header_simple_end}-->

<div class="bs-container clearfix">
	<div class="bs-left-container  clearfix">
		<!--{template left}-->
	</div>
	<div class="left-drager">
		<div class="left-drager-op">
			<div class="left-drager-sub"></div>
		</div>
	</div>

	<div class="bs-main-container  clearfix">

		<!--{if !$operation}-->
		<div class="main-header clearfix">
			<ul class="nav nav-pills nav-pills-bottomguide">
				<li <!--{if !$do}--> class="active"<!--{/if}-->>
					<a href="{ADMINSCRIPT}?mod=$mod">{lang all_theme}</a>
				</li>
				<li>
					<a href="{ADMINSCRIPT}?mod=$mod&op=list">{lang uninstalled_theme}</a>
				</li>
				<li class="pull-right">
					<a href="{ADMINSCRIPT}?mod=thame&op=edit">{lang add_theme}</a>
				</li>
			</ul>
		</div>
		<div class="main-content clearfix" style="padding:20px;border-top:1px solid #FFF">
			<!--{if $count}-->
			<ul id="colorContainer" class="thumbnails list-unstyled">
				<!--{loop $thames $key $value}-->
				<li id="thame_$value[id]" class=" thame_block">
					<div class="clearfix" style="position:relative;padding:10px 10px 0">
						<div class="delete" style="position:absolute;right:10px;top:10px;width:100px">
							<a href="javascript:;" onclick="deletethame('$value[id]');return false" title="{lang delete}"><i class="glyphicon glyphicon-trash ibtn"></i></a>
							<a href="{ADMINSCRIPT}?mod=$mod&op=edit&id=$value[id]" title="{lang edit}"><i class="glyphicon glyphicon-edit ibtn"></i></a>
							<a href="{ADMINSCRIPT}?mod=$mod&op=cp&do=export&id=$value[id]" title="{lang export}" target="_blank"><i class="glyphicon glyphicon-export ibtn"></i></a>
						</div>
						<p class="text-center">
							<a href="{ADMINSCRIPT}?mod=$mod&op=edit&id=$value[id]"><img title="$value[title]" alt="$value[title]" class="img-thumbnail img_120_75" src="$value[thumb]" /></a>
						</p>
						<p class="text-center" style="margin:0">
							<a href="{ADMINSCRIPT}?mod=$mod&op=edit&id=$value[id]">$value[name]</a>
						</p>
					</div>
				</li>
				<!--{/loop}-->
			</ul>
			<!--{if $multi}-->
			<div class="text-center clearfix">$multi</div>
			<!--{/if}-->
			<!--{else}-->
			<div class="well well-small">{lang none_write_add_theme}，
				<a href="{ADMINSCRIPT}?mod=$mod&op=edit">{lang add_theme}</a>
			</div>
			<!--{/if}-->
		</div>
		<script type="text/javascript">
			jQuery(document).ready(function() {
				var el = jQuery('.thame_block');
				el.on('mouseenter', function() {
					jQuery(this).addClass('hover');
				});
				el.on('mouseleave', function() {
					jQuery(this).removeClass('hover');
				});
			});

			function deletethame(id) {
				if(confirm('{lang sure_want_delete_theme}')) {
					jQuery.getJSON('{ADMINSCRIPT}?mod=thame&op=ajax&do=deletethame&id=' + id, function(json) {
						if(json.error) {

						} else {
							jQuery('#thame_' + id).remove();
						}
					});
				}
			}
		</script>

		<!--{elseif $operation=='color'}-->
		<div class="main-header clearfix" style="position:inherit;padding:5px;"> <span style="line-height:30px;float:left">{lang choose_color_add}&nbsp;&nbsp;</span>
			<div class="input-group pull-left" style="width:180px;padding-right:20px;">
				<input id="color_val" type="text" value="#000" class="form-control input-sm" placeholder="{lang click_right_side_color_chooser}">
				<a class="input-group-addon" initialized="true" id="c1" onclick="c1_frame.location='static/image/tool/getcolor.htm?c1|color_val';showMenu({'ctrlid':'c1'})" style="background-color: #000;width:30px;"></a>
			</div>
			<button type="button" class="btn btn-primary btn-sm pull-left" onclick="addColor(this)">{lang add}</button>
			<span style="line-height:30px;float:left" id="return_color"></span> <span id="c1_menu" style="display: none">
    			<iframe name="c1_frame" src="" frameborder="0" height="148" scrolling="no" width="210"></iframe>
			</span>
		</div>
		<div class="main-content clearfix" style="padding:15px;border-top:1px solid #FFF">
			<ul id="colorContainer" class="clearfix list-unstyled">
				<!--{loop $list $key $value}-->
				<li id="color_$value[bid]" backimg="$value[val]" class="pull-left color_block" style="width:110px;height:110px;position:relative;padding:10px">
					<a href="javascript:;" style="position:absolute;right:0px;top:0px;" class="delete" onclick="deletewallpaper('$value[bid]');return false" title="{lang delete}"><i class="glyphicon glyphicon-remove-sign"></i></a>
					<!--  <button style="position:absolute;right:5px;top:5px;" type="button" class="delete pull-right"  aria-hidden="true" onclick="deletewallpaper('$value[bid]')" title="删除"></button>-->
					<a class="img-thumbnail" style="display:inline-block;width:90px;height:90px;background:$value[val]" title="$value[title]"></a>
				</li>
				<!--{/loop}-->
			</ul>
			<!--{if $multi}-->
			<div class="text-center clearfix" style="margin:10px">$multi</div>
			<!--{/if}-->
			<!--{if !$count}-->
			<div class="well well-small">{lang theme_thame_set_color_selector}</div>
			<!--{/if}-->
		</div>
		<script type="text/javascript">
			jQuery(document).ready(function() {
				var el = jQuery('.color_block');
				el.on('mouseenter', function() {
					jQuery(this).addClass('hover');
				});
				el.on('mouseleave', function() {
					jQuery(this).removeClass('hover');
				});
				el.on('click', function() {
					jQuery('.color_block').removeClass('active1');
					jQuery(this).addClass('active1');
					document.getElementById('color_val').value = jQuery(this).attr('backimg');
					document.getElementById('c1').style.backgroundColor = jQuery(this).attr('backimg');
				});
			});
			var colorTimer = 0;

			function addColor(obj) {
				var color = jQuery('#color_val').val();
				jQuery.getJSON('{ADMINSCRIPT}?mod=thame&op=ajax&do=addcolor&val=' + encodeURIComponent(color), function(json) {
					if(json && json.bid > 0) {
						var el = jQuery('<li id="color_' + json.bid + '" class="pull-left color_block" style="width:110px;height:110px;position:relative;padding:10px"><a href="javascript:;" style="position:absolute;right:0px;top:0px;" class="delete" onclick="deletewallpaper(\'' + json.bid + '\')" title="{lang delete}"><i class="glyphicon glyphicon-remove-sign"></i></a><a class="img-thumbnail"  style="display:inline-block;width:90px;height:90px;background:' + json.val + '"></a></li>')
							.on('mouseenter', function() {
								jQuery(this).addClass('hover');
							})
							.on('mouseleave', function() {
								jQuery(this).removeClass('hover');

							});
						if(jQuery('#colorContainer').children().length > 0) {
							jQuery('#colorContainer').children().first().before(el);
						} else {
							el.appendTo('#colorContainer');
						}
						jQuery('#return_color').html('<span class="text-success">{lang add_success}</span>');
						jQuery('.well').remove();
					} else if(json && json.error) {
						jQuery('#return_color').html('<span class="text-danger">' + json.error + '</span>');
					}

					if(colorTimer) window.clearTimeout(colorTimer);
					colorTimer = window.setTimeout(function() { jQuery('#return_color').html('') }, 3000);
				});
			}
		</script>
		<!--{elseif $operation=='syscolor'}-->
		<div class="main-header clearfix" style="position:inherit;padding:5px;"> <span style="line-height:30px;float:left">{lang choose_color_add}&nbsp;&nbsp;</span>
			<div class="input-group pull-left" style="width:180px;padding-right:20px;">
				<input id="color_val" type="text" value="#000" class="form-control input-sm" placeholder="{lang click_right_side_color_chooser}">
				<a class="input-group-addon" initialized="true" id="c1" onclick="c1_frame.location='static/image/tool/getcolor.htm?c1|color_val';showMenu({'ctrlid':'c1'})" style="background-color: #000;width:30px;"></a>
			</div>
			<button type="button" class="btn btn-primary btn-sm pull-left" onclick="addColor(this)">{lang add}</button>
			<span style="line-height:30px;float:left" id="return_color"></span> <span id="c1_menu" style="display: none">
    			<iframe name="c1_frame" src="" frameborder="0" height="148" scrolling="no" width="210"></iframe>
    		</span>
		</div>
		<div class="main-content clearfix" style="padding:15px;border-top:1px solid #FFF">
			<ul id="colorContainer" class="clearfix list-unstyled">
				<!--{loop $list $key $value}-->
				<li id="color_$value[bid]" backimg="$value[val]" class="pull-left color_block" style="width:110px;height:110px;position:relative;padding:10px">
					<a href="javascript:;" style="position:absolute;right:0px;top:0px;" class="delete" onclick="deletewallpaper('$value[bid]');return false" title="{lang delete}"><i class="glyphicon glyphicon-remove-sign"></i></a>
					<a class="img-thumbnail" style="display:inline-block;width:90px;height:90px;background:$value[val]" title="$value[title]"></a>
				</li>
				<!--{/loop}-->
			</ul>
			<!--{if $multi}-->
			<div class="text-center clearfix" style="margin:10px">$multi</div>
			<!--{/if}-->
			<!--{if !$count}-->
			<div class="well well-small">{lang theme_thame_set_color_selector}</div>
			<!--{/if}-->
		</div>
		<script type="text/javascript">
			jQuery(document).ready(function() {
				var el = jQuery('.color_block');
				el.on('mouseenter', function() {
					jQuery(this).addClass('hover');
				});
				el.on('mouseleave', function() {
					jQuery(this).removeClass('hover');
				});
				el.bind('click', function() {
					jQuery('.color_block').removeClass('active1');
					jQuery(this).addClass('active1');
					document.getElementById('color_val').value = jQuery(this).attr('backimg');
					document.getElementById('c1').style.backgroundColor = jQuery(this).attr('backimg');

				});
			});
			var colorTimer = 0;

			function addColor() {
				var color = jQuery('#color_val').val();

				jQuery.getJSON('{ADMINSCRIPT}?mod=thame&op=ajax&do=addsyscolor&val=' + encodeURIComponent(color), function(json) {
					if(json && json.bid > 0) {
						var el = jQuery('<li id="color_' + json.bid + '" class="pull-left color_block" style="width:110px;height:110px;position:relative;padding:10px"><a href="javascript:;" style="position:absolute;right:0px;top:0px;" class="delete" onclick="deletewallpaper(\'' + json.bid + '\')" title="{lang delete}"><i class="glyphicon glyphicon-remove-sign"></i></a><a class="img-thumbnail"  style="display:inline-block;width:90px;height:90px;background:' + json.val + '"></a></li>')
							.on('mouseenter', function() {
								jQuery(this).addClass('hover');
							})
							.on('mouseleave', function() {
								jQuery(this).removeClass('hover');

							});
						if(jQuery('#colorContainer').children().length > 0) {
							jQuery('#colorContainer').children().first().before(el);
						} else {
							el.appendTo('#colorContainer');
						}
						jQuery('#return_color').html('<span class="text-success">{lang add_success}</span>');
						jQuery('.well').remove();
					} else if(json && json.error) {
						jQuery('#return_color').html('<span class="text-danger">' + json.error + '</span>');
					}

					if(colorTimer) window.clearTimeout(colorTimer);
					colorTimer = window.setTimeout(function() { jQuery('#return_color').html('') }, 3000);
				});
			}
		</script>
		<!--{elseif $operation=='repeat'}-->
		<div class="main-header clearfix">
			<ul class="nav nav-pills nav-pills-bottomguide">
				<li <!--{if !$do && !$classid}--> class="active"<!--{/if}-->>
					<a href="{ADMINSCRIPT}?mod=$mod&operation=$operation">{lang all}</a>
				</li>
				<!--{loop $class $value}-->
				<li <!--{if $value[classid]==$classid}-->class="active"<!--{/if}-->>
					<a href="{ADMINSCRIPT}?mod=$mod&operation=$operation&classid=$value[classid]">$value[classname]</a>
				</li>
				<!--{/loop}-->
				<li <!--{if $do=='class' }--> class="active"<!--{/if}-->>
					<a href="{ADMINSCRIPT}?mod=$mod&operation=repeat&do=class">{lang type_management}</a>
				</li>
			</ul>
		</div>
		<!--{if $do=='class'}-->
		<div class="main-content clearfix" style="padding:0;border-top:1px solid #FFF">
			<form name="cpform" class="form-horizontal form-horizontal-left" method="post" action="{ADMINSCRIPT}?mod=thame&operation=class" id="cpform">
				<input type="hidden" name="formhash" value="{FORMHASH}">
				<input type="hidden" name="type" value="$operation">
				<ul id="classContainer" class="clearfix list-unstyled">
					<table class="table table-hover">
						<thead>
							<tr>
								<th width="40">&nbsp;</th>
								<th width="60p">{lang sort}</th>
								<th>{lang classify_name}</th>
							</tr>
						</thead>
						<tbody>
							<!--{loop $class $value}-->
							<tr>
								<td><input type="hidden" name="ids[{$value[classid]}]" value="$value[classid]">
									<input type="checkbox" name="del[]" value="$value[classid]" style="width:40px;" /></td>
								<td><input type="text" class="form-control" value="$value[disp]" name="disp[{$value[classid]}]" class="form-control" style="width:45px"></td>
								<td><input value="$value[classname]" class="form-control" type="text" name="classname[{$value[classid]}]" class="input-lg"></td>
							</tr>
							<!--{/loop}-->
						</tbody>
						<thead>
							<tr>
								<td colspan="5">&nbsp;&nbsp;&nbsp;
									<input type="checkbox" name="chkall" id="chkall" class="checkbox-inline ml20" onclick="checkAll('prefix', this.form, 'del')" title="{lang del1}"> &nbsp;{lang del}&nbsp;&nbsp;&nbsp;
									<input type="submit" class="btn btn-primary" value="{lang submit}" /> &nbsp;&nbsp;&nbsp;
									<button class="btn btn-success" onclick="addClass();return false">{lang add_new_type}</button>
								</td>
							</tr>
						</thead>
					</table>
				</ul>
			</form>
			<!--{if !$class}-->
			<div class="alert alert-warning">{lang theme_thame_click_add_class}</div>
			<!--{/if}-->
		</div>
		<script type="text/javascript">
			function addClass() {
				var html = '<tr>';
				html += '<td>&nbsp;</td>';
				html += '<td><input type="text" value="0" name="newdisp[]" class="form-control" style="width:40px;" ></td>';
				html += '<td><input value="" type="text" name="newclassname[]" class="form-control"></td>';
				html += '</tr>';
				// jQuery(html).appendTo('#classContainer');
				jQuery('#classContainer tbody').append(html);
			}
		</script>
		<!--{else}-->
		<div class="main-content clearfix" style="padding:15px;border-top:1px solid #FFF">
			<div class="" style="border:1px solid #CCC;margin-bottom:10px;">
				<div style="line-height:30px;height:30px;padding:0 10px;font-size:16px;font-weight:bold;background:#F7F7F7;border-bottom:1px solid #CCC;margin-bottom:10px;">{lang add_wallpaper}</div>
				<form name="cpform" class="form-horizontal form-horizontal-left" method="post" action="{ADMINSCRIPT}?mod=thame&operation=repeat&do=add" id="cpform" enctype="multipart/form-data">
					<input type="hidden" name="formhash" value="{FORMHASH}">
					<input type="hidden" name="type" value="repeat">
					<div class="form-group">
						<label class="control-label" style="width:140px" for="classid">{lang choosing_wallpaper_categories}：</label>
						<select id="classid" name="classid" style="margin: 0px;" class="form-control">
							<option value="0">{lang choosing_wallpaper_categories}</option>
							<!--{loop $class $value}-->
							<option value="$value[classid]" <!--{if $value[classid]==$classid}-->selected="selected"<!--{/if}-->>$value[classname]</option>
							<!--{/loop}-->
						</select>
					</div>
					<div class="form-group">
						<label class="control-label" style="width:140px" for="backimg">{lang uploading_wallpaper}：</label>
						<input name="backimg" id="backimg" value="" type="file" class="form-control">
					</div>
					<div class="form-group">
						<label class="control-label" style="width:140px;"></label>
						<input class="btn btn-primary" id="submit_stylesubmit" name="stylesubmit" title="" value="{lang uploading}" type="submit">
					</div>
				</form>
			</div>
			<!--{if $count}-->
			<ul id="colorContainer" class="clearfix list-unstyled">
				<!--{loop $list $key $value}-->
				<li id="color_$value[bid]" class="pull-left color_block" style="padding:10px;width:110px;height:110px;position:relative">
					<a href="javascript:;" style="position:absolute;right:0px;top:0px;" class="delete" onclick="deletewallpaper('$value[bid]');return false" title="{lang delete}"><i class="glyphicon glyphicon-remove-sign"></i></a>
					<a class="img-thumbnail" style="display:inline-block;width:90px;height:90px;background:url($value[val])" title="$value[title]"></a>
				</li>
				<!--{/loop}-->
			</ul>
			<!--{if $multi}-->
			<div class="text-center clearfix">$multi</div>
			<!--{/if}-->
			<!--{else}-->
			<div class="well well-small">{lang classification_no_wallpaper}</div>
			<!--{/if}-->
		</div>
		<script type="text/javascript">
			jQuery(document).ready(function() {
				var el = jQuery('.color_block');
				el.on('mouseenter', function() {
					jQuery(this).addClass('hover');
				});
				el.on('mouseleave', function() {
					jQuery(this).removeClass('hover');
				});
			});
		</script>
		<!--{/if}-->
		<!--{elseif $operation=='scale'}-->
		<div class="main-header clearfix">
			<ul class="nav nav-pills nav-pills-bottomguide">
				<li <!--{if !$do && !$classid}--> class="active"<!--{/if}-->>
					<a href="{ADMINSCRIPT}?mod=$mod&operation=$operation">{lang all}</a>
				</li>
				<!--{loop $class $value}-->
				<li <!--{if $value[classid]==$classid}-->class="active"<!--{/if}-->>
					<a href="{ADMINSCRIPT}?mod=$mod&operation=$operation&classid=$value[classid]">$value[classname]</a>
				</li>
				<!--{/loop}-->
				<li <!--{if $do=='class' }--> class="active"<!--{/if}-->>
					<a href="{ADMINSCRIPT}?mod=$mod&operation=scale&do=class">{lang type_management}</a>
				</li>
			</ul>
		</div>
		<!--{if $do=='class'}-->
		<div class="main-content clearfix" style="padding:0;border-top:1px solid #FFF">
			<form name="cpform" class="form-horizontal form-horizontal-left" method="post" action="{ADMINSCRIPT}?mod=thame&operation=class" id="cpform">
				<input type="hidden" name="formhash" value="{FORMHASH}">
				<input type="hidden" name="type" value="$operation">
				<ul id="classContainer" class="clearfix list-unstyled">
					<table class="table table-hover">
						<thead>
							<tr>
								<th width="40">&nbsp;</th>
								<th width="60p">{lang sort}</th>
								<th>{lang classify_name}</th>
							</tr>
						</thead>
						<tbody>
							<!--{loop $class $value}-->
							<tr>
								<td><input type="hidden" name="ids[{$value[classid]}]" value="$value[classid]">
									<input type="checkbox" name="del[]" value="$value[classid]" style="width:40px;" /></td>
								<td><input type="text" class="form-control" value="$value[disp]" name="disp[{$value[classid]}]" class="form-control" style="width:45px"></td>
								<td><input value="$value[classname]" class="form-control" type="text" name="classname[{$value[classid]}]" class="input-lg"></td>
							</tr>
							<!--{/loop}-->
						</tbody>
						<thead>
							<tr>
								<td colspan="5">&nbsp;&nbsp;&nbsp;
									<input type="checkbox" name="chkall" id="chkall" class="checkbox-inline ml20" onclick="checkAll('prefix', this.form, 'del')" title="{lang del1}"> &nbsp;{lang del}&nbsp;&nbsp;&nbsp;
									<input type="submit" class="btn btn-primary" value="{lang submit}" /> &nbsp;&nbsp;&nbsp;
									<button class="btn btn-success" onclick="addClass();return false">{lang add_new_type}</button>
								</td>
							</tr>
						</thead>
					</table>
				</ul>
			</form>
			<!--{if !$class}-->
			<div class="alert alert-warning">{lang theme_thame_click_add_class}</div>
			<!--{/if}-->
		</div>
		<script type="text/javascript">
			function addClass() {
				var html = '<tr>';
				html += '<td>&nbsp;</td>';
				html += '<td><input type="text" value="0" name="newdisp[]" class="form-control" style="width:40px;" ></td>';
				html += '<td><input value="" type="text" name="newclassname[]" class="form-control"></td>';
				html += '</tr>';
				// jQuery(html).appendTo('#classContainer');
				jQuery('#classContainer tbody').append(html);
			}
		</script>
		<!--{else}-->
		<div class="main-content clearfix" style="padding:10px;border-top:1px solid #FFF">
			<div class="" style="border:1px solid #CCC;margin-bottom:10px;">
				<div style="line-height:30px;height:30px;padding:0 10px;font-size:16px;font-weight:bold;background:#F7F7F7;border-bottom:1px solid #CCC;margin-bottom:10px;">{lang add_wallpaper}</div>
				<form name="cpform" class="form-horizontal form-horizontal-left" method="post" action="{ADMINSCRIPT}?mod=thame&operation=scale&do=add" id="cpform" enctype="multipart/form-data">
					<input type="hidden" name="formhash" value="{FORMHASH}">
					<input type="hidden" name="type" value="scale">
					<div class="form-group">
						<label class="control-label" style="width:140px" for="classid">{lang choosing_wallpaper_categories}：</label>
						<select id="classid" name="classid" style="margin: 0px;" class="form-control">
							<option value="0">{lang choosing_wallpaper_categories}</option>
							<!--{loop $class $value}-->
							<option value="$value[classid]" <!--{if $value[classid]==$classid}-->selected="selected"<!--{/if}-->>$value[classname]</option>
							<!--{/loop}-->
						</select>
					</div>
					<div class="form-group">
						<label class="control-label" style="width:140px" for="backimg">{lang uploading_wallpaper}：</label>
						<input name="backimg" id="backimg" value="" type="file" class="form-control">
					</div>
					<div class="form-group">
						<label class="control-label" style="width:140px;"></label>
						<input class="btn btn-primary" id="submit_stylesubmit" name="stylesubmit" title="" value="{lang uploading}" type="submit">
					</div>
				</form>
			</div>
			<!--{if $count}-->
			<ul id="colorContainer" class="clearfix list-unstyled">
				<!--{loop $list $key $value}-->
				<li id="color_$value[bid]" class="pull-left color_block text-center" style="padding:10px;width:130px;height:90px;position:relative">
					<a href="javascript:;" style="position:absolute;right:0px;top:0px;" class="delete" onclick="deletewallpaper('$value[bid]');return false" title="{lang delete}"><i class="glyphicon glyphicon-remove-sign"></i></a>
					<a href="$value[val]" target="_blank"><img title="$value[title]" alt="$value[title]" class="img-thumbnail img_100_64" src="$value[thumbpic]" /></a>
				</li>
				<!--{/loop}-->
			</ul>
			<!--{if $multi}-->
			<div class="text-center clearfix">$multi</div>
			<!--{/if}-->
			<!--{else}-->
			<div class="well well-small">{lang have_no_wallpaper}</div>
			<!--{/if}-->

		</div>
		<script type="text/javascript">
			jQuery(document).ready(function() {
				var el = jQuery('.color_block');
				el.on('mouseenter', function() {
					jQuery(this).addClass('hover');
				});
				el.on('mouseleave', function() {
					jQuery(this).removeClass('hover');
				});
			});
		</script>
		<!--{/if}-->
		<!--{elseif $operation=='url'}-->
		<div class="main-content clearfix" style="padding:10px;border-top:1px solid #FFF">
			<div style="border:1px solid #CCC;margin-bottom:10px;">
				<div style="line-height:30px;height:30px;padding:0 10px;font-size:16px;font-weight:bold;background:#F7F7F7;border-bottom:1px solid #CCC;margin-bottom:10px;">{lang add_dynamic_state_wallpaper}</div>
				<form name="cpform" class="form-horizontal form-horizontal-left" method="post" action="{ADMINSCRIPT}?mod=thame&operation=url&do=add" id="cpform" enctype="multipart/form-data">
					<input type="hidden" name="formhash" value="{FORMHASH}">
					<input type="hidden" name="type" value="url">
					<div class="form-group">
						<label class="control-label" for="title">{lang wallpaper_name}：</label>
						<input class="form-control" name="title" id="title" value="" type="text" style="height:auto">
						<span class="help-inline">{lang optional_name_wallpaper}</span> </div>
					<div class="form-group">
						<label class="control-label" for="val">{lang wallpaper_site}：</label>
						<input class="form-control" name="val" id="val" value="" type="text" style="height:auto">
						<span class="help-inline">{lang theme_thame_root_directory_location}</span> </div>
					<div class="form-group">
						<label class="control-label" for="backimg">{lang upload_thumbnail}：</label>
						<input name="backimg" id="backimg" class="form-control" value="" type="file" class="file">
					</div>
					<div class="form-group">
						<label class="control-label"></label>
						<input class="btn btn-primary" id="submit_stylesubmit" name="stylesubmit" title="" value="上 传" type="submit">
					</div>
				</form>
			</div>
			<!--{if $count}-->
			<ul id="colorContainer" class="clearfix list-unstyled">
				<!--{loop $list $key $value}-->
				<li id="color_$value[bid]" class="pull-left color_block text-center" style="padding:10px;width:130px;height:90px;position:relative">
					<a href="javascript:;" style="position:absolute;right:0px;top:0px;" class="delete" onclick="deletewallpaper('$value[bid]');return false" title="{lang delete}"><i class="glyphicon glyphicon-remove-sign"></i></a>
					<a href="$value[val]" target="_blank"><img title="$value[title]" alt="$value[title]" class="img-thumbnail img_100_64" src="$value[thumbpic]" /></a>
				</li>
				<!--{/loop}-->
			</ul>
			<!--{if $multi}-->
			<div class="text-center clearfix" style="margin:10px">$multi</div>
			<!--{/if}-->
			<!--{else}-->
			<div class="well well-small">{lang have_no_wallpaper}</div>
			<!--{/if}-->
		</div>
		<script type="text/javascript">
			jQuery(document).ready(function() {
				var el = jQuery('.color_block');
				el.on('mouseenter', function() {
					jQuery(this).addClass('hover');
				});
				el.on('mouseleave', function() {
					jQuery(this).removeClass('hover');
				});
			});
		</script>

		<!--{/if}-->
	</div>
</div>
<script type="text/javascript">
	jQuery('.left-drager').leftDrager_layout();

	function deletewallpaper(bid) {
		jQuery.getJSON('{ADMINSCRIPT}?mod=thame&op=ajax&do=delete&bid=' + bid, function(json) {
			if(json.error) {
				jQuery('#return_color').html('<span class="text-danger">' + json.error + '</span>');
			} else {
				jQuery('#color_' + bid).remove();
				jQuery('#return_color').html('<span class="text-success">{lang delete_success}！</span>');
			}
			try {
				if(colorTimer) window.clearTimeout(colorTimer);
				colorTimer = window.setTimeout(function() { jQuery('#return_color').html('') }, 3000);
			} catch(e) {}
		});
	}
</script>
<!--{template common/footer_simple}-->